home *** CD-ROM | disk | FTP | other *** search
/ .net (Turkey) 1998 March / .net Internet Dergisi - CD 5.iso / mac / 2 Getting Started / E-mail Getting Started / Email Merge.sea / Email Merge 1.1 / Email Merge / stack_-1.xml < prev   
Extensible Markup Language  |  1997-04-20  |  6KB  |  24 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>5</cardCount>
  7.     <cardID>2976</cardID>
  8.     <listID>4002</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>480</width>
  14.         <height>320</height>
  15.     </cardSize>
  16.     <script>on openstackcreateenvironmentif not CheckGestalts() thenanswer "Email Merge requires AppleScript, and System 7.x."&&¬¨"AppleScript is available freely on the Internet,"&&¬¨"and System 7.x can be purchased from any Apple stockist."lock messagesdomenu "Quit"elseInitialiseApplicationset the cursor to arrowShowAboutBoxset the textarrows to trueend ifend openstackon createenvironmentset the cursor to watchset the userlevel to 2delete menuitem "-2" of menu "Edit"delete menuitem "New Card" of menu "Edit"delete menuitem "Delete Card" of menu "Edit"delete menu "Go"delete menu "Font"delete menu "Style"set the name of menuitem 1 of menu "Apple" to "About Email Merge..."set the menumessage of menuitem 1 of menu "Apple" to "ShowAboutBox"put "Import..."&return&"Export..."&return&"-"&return&¬¨"Edit Data..."&return&"Edit Message..."&return&¬¨"Preview / Merge..."&return&"-"&return&"Quit" into menu "File"set the menumessage of menuitem "Quit" of menu "File" to¬¨"domenu "&quote&"Quit HyperCard"&quoteset the commandchar of menuitem "Quit" of menu "File" to "Q"set the menumessage of menuitem "Import..." of menu "File" to¬¨"go to card "&quote&"import"&quoteset the commandchar of menuitem "Import..." of menu "File" to "I"set the menumessage of menuitem "Export..." of menu "File" to¬¨"doexport"set the commandchar of menuitem "Export..." of menu "File" to "E"set the menumessage of menuitem "Edit Data..." of menu "File" to¬¨"go to card "&quote&"data"&quoteset the commandchar of menuitem "Edit Data..." of menu "File" to "D"set the menumessage of menuitem "Edit Message..." of menu "File" to¬¨"go to card "&quote&"message"&quoteset the commandchar of menuitem "Edit Message..." of menu "File" to "M"set the menumessage of menuitem "Preview / Merge..." of menu "File" to¬¨"go to card "&quote&"merge"&quoteset the commandchar of menuitem "Preview / Merge..." of menu "File" to "P"end createenvironmenton eset the userlevel to 5reset menubarend eon closestackhide cd fld "help" of cd "help"KillApplicationend closestackon memoryalertanswer "Email Merge has run out of memory."end memoryalerton mouseenterif the hilite of bg btn "popup" then showpopuphelpend mouseenteron showpopuphelpget the selectedchunkput the last line of the script of the target into bg fld "help"select itend showpopuphelpon resetpopuphelpput "Email Merge 1.1 ¬© Gideon Greenspan, Sig Software" into bg fld "help"end resetpopuphelpfunction replacemerge text, flds, datarepeat with l=1 to the number of lines in fldsrepeatput offset("¬´"&line l of flds&"¬ª", text) into offif off is 0 then exit repeatput line l of data into char off to off+length(line l of flds)+1 of textend repeatend repeatreturn textend replacemergeon InitialiseApplicationget EmailMergeExternals("Init")end InitialiseApplicationon KillApplicationget EmailMergeExternals("Kill")end KillApplicationfunction IsProgramAvailable programreturn EmailMergeExternals("Prog", program)end IsProgramAvailablefunction CheckGestaltsreturn EmailMergeExternals("Gest")end CheckGestaltsfunction IsRegisteredreturn EmailMergeExternals("Regd")-- please don't waste your time hacking this :->-- it's thoroughly checked in external code anywayend IsRegisteredon DictionaryClearget EmailMergeExternals("Cler")end DictionaryClearfunction DictionaryItemsreturn EmailMergeExternals("Itms")end DictionaryItemsfunction DictionaryRead itemreturn EmailMergeExternals("Read", , item-1)end DictionaryReadfunction DictionaryWrite item, datareturn EmailMergeExternals("Wrte", data, item-1)end DictionaryWritefunction DictionaryAppendreturn EmailMergeExternals("Apnd")end DictionaryAppendon DictionaryRemove itemget EmailMergeExternals("Rmve", , item-1)end DictionaryRemovefunction DictionaryAdd datareturn EmailMergeExternals("AddD", tab&return&data)end DictionaryAddon ShowAboutBoxget EmailMergeExternals("Abot")end ShowAboutBoxon doexportask file "Export database to :"if the result is not cancel thenput it into filenameopen file filenameput DictionaryItems() into itmsrepeat with l=1 to itmsget DictionaryRead(l)put empty into datarepeat with i=1 to the number of lines in itput line i of it&tab after dataend repeatput return into the last char of datawrite data to file filenameif l mod 10 is 0 then put "Exported "&l&" records" into bg fld "Help"end repeatclose file filenameend ifend doexporton cleanupglobal _EMIdata, _EMIfilelock messagesput empty into _EMIdataput empty into _EMIfileDictionaryClearset the topleft of cd window to 0,40set the hilite of bg btn "popup" to trueput empty into bg fld "number"set the script of this bg to emptygo to cd "help"select line 0 of cd fld "topics"send mouseup to cd fld "topics"go to cd "import"put empty into cd fld "fields"put empty into cd fld "data"put empty into cd fld "clipboard"go to cd "data"put empty into cd fld "fields"put empty into cd fld "data"go to cd "message"put empty into cd fld "subject"put "¬´Email¬ª" into cd fld "to"put empty into cd fld "cc"put empty into cd fld "bcc"send mouseleave to cd btn "insert"put "Dear ¬´Name¬ª," into cd fld "message"go to cd "merge"put empty into cd fld "preview"go to cd "help"resetpopuphelpedomenu "compact stack"end cleanup</script>
  17.     <background id="2787" file="background_2787.xml" name="" />
  18.     <card id="2976" file="card_2976.xml" marked="false" name="Help" owner="2787" />
  19.     <card id="4437" file="card_4437.xml" marked="false" name="Import" owner="2787" />
  20.     <card id="6586" file="card_6586.xml" marked="false" name="Data" owner="2787" />
  21.     <card id="4670" file="card_4670.xml" marked="false" name="Message" owner="2787" />
  22.     <card id="5010" file="card_5010.xml" marked="false" name="Merge" owner="2787" />
  23. </stack>
  24.